﻿using System;
using System.Collections.Generic;

namespace Chengheng.Entity.Models;

/// <summary>
/// 用户_用户
/// </summary>
public partial class UserUser
{
    public long Id { get; set; }

    /// <summary>
    /// 创建日期时间
    /// </summary>
    public DateTime CreateDatetime { get; set; }

    /// <summary>
    /// 电子邮件
    /// </summary>
    public string? Email { get; set; }

    /// <summary>
    /// 登录的ip地址
    /// </summary>
    public string? IpAddress { get; set; }

    /// <summary>
    /// 昵称
    /// </summary>
    public string Nickname { get; set; } = null!;

    /// <summary>
    /// 密码
    /// </summary>
    public string Password { get; set; } = null!;

    /// <summary>
    /// 手机号码一键登录
    /// </summary>
    public string? PhoneNumber { get; set; }

    /// <summary>
    /// 登录的平台
    /// </summary>
    public string? Platform { get; set; }

    /// <summary>
    /// 用户名
    /// </summary>
    public string Username { get; set; } = null!;

    /// <summary>
    /// 0 欠费 1 正常 2 试用 3 禁用
    /// </summary>
    public sbyte Status { get; set; }

    /// <summary>
    /// 上级id; 0 顶级
    /// </summary>
    public long? ParentId { get; set; }

    /// <summary>
    /// 最后登录时间
    /// </summary>
    public DateTime? LastLoginDatetime { get; set; }

    public virtual ICollection<UserUser> InverseParent { get; set; } = new List<UserUser>();

    public virtual UserUser? Parent { get; set; }

    public virtual ICollection<UserRole> UserRoles { get; set; } = new List<UserRole>();

    public virtual UserUserPicture? UserUserPicture { get; set; }

    public virtual ICollection<UserUserVipsubscription> UserUserVipsubscriptions { get; set; } = new List<UserUserVipsubscription>();
}
